package com.wn.deadLetterchange;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class EmailLetterConsumer {


    @RabbitListener(queues = "letterQueueC")
    public void receiveLetterC(Message message, Channel channel,String leihou) throws IOException {
        System.out.println("接收到消息:" + leihou);
        channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
    }


}
